<?php
class Layout extends CI_Controller
{
	public function __construct()
	{
		parent::__construct();
		date_default_timezone_set("Asia/Ho_Chi_Minh");
		$this->load->model('utility_model', 'utility_model');
		$this->load->model('product_model', 'product_model');
		$this->load->model('menu_model', 'menu_model');
        $this->load->model('category_model', 'category_model');
		
		
		$suport = $this->utility_model->getSuport();
		$dichvu = $this->menu_model->getMenudichvu();
		$this->_data['header'] =  $this->load->view('home/header_view', array(
			'dichvu' => $dichvu,
			'suport' => $suport,
		), true);
		
		$cate0 = $this->utility_model->getCatewhere(0);
		$cate1 = $this->utility_model->getCatewhere(1);
		$tintuc = $this->utility_model->getTintuc();
		$getspcungloai = $this->utility_model->getspcungloai();
		$this->_data['sidebar'] =  $this->load->view('home/sidebar_view', array(
			'cate0' => $cate0,
			'cate1' => $cate1,
			'tintuc' => $tintuc,
			'getspcungloai' => $getspcungloai,
		), true);
		
		$cfooter = $this->utility_model->cfooter();
		$this->_data['footer'] =  $this->load->view('home/footer_view', array(
			'cfooter' => $cfooter,
		), true);
	}
}